package com.wn.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(
        value = "cinema-portal-service",
        fallback = UserFeignClientFallback.class)   //失败后进行的服务降级
public interface UserFeignClient {

    @GetMapping("/user/{id}")
    String findUserById(@PathVariable("id") Integer userId);

}